var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, o, n) {
    var a, l = arguments.length, r = l < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, o, n); else for (var i = e.length - 1; 0 <= i; i--) (a = e[i]) && (r = (l < 3 ? a(r) : 3 < l ? a(t, o, r) : a(t, o)) || r);
    return 3 < l && r && Object.defineProperty(t, o, r), r;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("AudioManager"), s = e("Global"), c = e("GameManager"), l = e("GameConfig"), d = e("GameData"), u = e("UIManager"), p = e("WebManager"), h = cc._decorator, f = h.ccclass, g = h.property, m = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.playNode = null, e.itemNode = null, e;
    }
    return i(e, t), e.prototype.onLoad = function() {
        l.GC.isVaild("eggsItem") ? (this.playNode.x = -385, this.itemNode.active && (this.itemNode.active = !1)) : (this.playNode.x = -500, 
        this.itemNode.active || (this.itemNode.active = !0));
    }, e.prototype.onClickItem = function() {
        r.default.getInstance().playAudio("按钮2"), p.default.getInstance().sentLog("点击巅峰界面道具模式按键"), 
        u.default.getInstance().preloadPnl("game2"), c.default.getInstance().matchType = c.MatchType.三对三, 
        c.default.getInstance().playTypeList.push(c.PlayType.道具), -1 < s.G.seasoncount && d.GD.seasonRewardTime < d.GD.seasonLastTime && !d.GD.isReward ? (cc.log("赛季奖励未领取"), 
        u.default.getInstance().loadPopPnl("season_reward")) : s.G.platform != s.Platform.XiaoDu ? !l.GC.isVaild("empty") && d.GD.petDataList.some(function(e, t) {
            return e && e.has && s.G.chargeList[t];
        }) && (l.GC.isCircle && !l.GC.isVaild("try") && d.GD.tryFailCount >= l.GC.cancelTryCount && (d.GD.topRank < s.G.gunModelList.length || d.GD.skins.length < s.G.personModelList.length) && (d.GD.emptyFailCount = 0, 
        d.GD.tryFailCount = 0), d.GD.emptyFailCount < l.GC.cancelEmptyCount) ? u.default.getInstance().loadPnl("empty") : !l.GC.isVaild("try") && d.GD.tryFailCount < l.GC.cancelTryCount && (d.GD.topRank < s.G.gunModelList.length || d.GD.skins.length < s.G.personModelList.length) ? u.default.getInstance().loadPopPnl("try") : c.default.getInstance().battleGame() : c.default.getInstance().battleGame();
    }, e.prototype.start = function() {}, a([ g(cc.Node) ], e.prototype, "playNode", void 0), 
    a([ g(cc.Node) ], e.prototype, "itemNode", void 0), a([ f ], e);
}(cc.Component);

n.default = m;